This invention relates generally to object oriented programming. More particularly, it relates to a class relationship tool for identifying and analyzing the class relationships for an object oriented system without requiring compilation.
Object oriented programming is one of the most important new technologies in software development. Object oriented programming offers significant capabilities in increasing programmer productivity and software code reuse. In object oriented programming, data and methods that operate on the data are combined into packages called "objects". By standardizing the messaging paths with which the objects communicate and limiting the interaction between objects to the standard paths, object oriented programming removes much of the complexity of traditional procedurally oriented programming.
A brief overview of some of the more important aspects of object oriented programming are provided below. More detailed discussions are available in many publicly available documents including Object Oriented Design With Applications by Grady Booch, Benjamin/Cummins Publishing Company, 1991 and Object Oriented Requirements Analysis and Logical Design by Donald G. Firesmith, John Wiley and Sons, Inc., 1993. An object includes a set of data which may be called "attributes" and a set of operations called "methods" which operate on the data. An object's data may generally change only through the operation of the object's methods. The combination of data and methods and objects is called "encapsulation". Through encapsulation, data within an object can only be changed by the methods associated with that object. The theory is that when the behavior of an object is confined to defined locations and interfaces, code modifications in the objects will have minimal impact on the other objects and elements in the system. Encapsulation also offers code which is more modular and maintainable than code written using more procedural techniques.
Another basic concept of object oriented programming is the "class". A class includes a set of data attributes, plus a set of allowable methods on the data attributes. Each object is usually an instance of some class. A class may be derived from another class in a process called "subclassing" or "inheritance". The subclass inherits the data attributes and methods of the parent or base class. A subclass typically adds code which overrides the data and/or methods of the base class or adds new data attributes and methods. As new subclasses are created, greater levels of specialization are provided. Through inheritance, developers may minimize the amount of new code needed to write an application program. As a significant portion of the functions needed for a particular task is provided in the base classes or some other class in the inheritance hierarchy, the programmer has a head start in program design and creation.
However, as classes begin to proliferate in a huge object oriented system, it is not unusual to have thousands of classes. It is often difficult to understand the relationship between two objects in the class hierarchy. Compounding the problem are the encapsulation and information hiding which are typical characteristics of object oriented systems. Identifying the relationships between classes becomes crucial for understanding, using and testing the system. Class relationships are often transitive. In a system with over a thousand classes, it is not difficult to find class relationships with long paths. This also increases the difficulty and complexity in identifying class relationships. Most existing tools for identifying class relationships in an object oriented system are of a browser type. There is a fundamental problem using browsers for huge object oriented systems: immediate class relationships are captured by the compiler. Thus, compilation becomes a prerequisite condition which is hard to satisfy since most object oriented programming language compilers are still not fully compatible to each other.
Therefore, there exists a need for a technique for identifying and analyzing class relationships in object oriented systems without requiring compilation.